#pragma once

#include "Point.h"
//#include "Enemy.h"

class Enemy;

class SteeringBehaviors
{
protected:
	Enemy* m_pEnemy;
	enum Deceleration{slow = 3, normal = 2, fast = 1}m_Deceleration;
	
public:
		//Constructors
	SteeringBehaviors();
	SteeringBehaviors(Enemy* Agent);
	SteeringBehaviors(SteeringBehaviors*);

		//Destructor
	~SteeringBehaviors();

	/******************************************************************************************************************\
	|											Seek Enemy Behavior													   |
	|	The seek steering behavior returns a force that directs an agent toward a target position.  Seek returns the   |
	|	steering force needed to change the current velocity to the desired velocity scaled to the maximum speed of    |
	|	the Object.																									   |
	\******************************************************************************************************************/
	point Seek(point& TargetPos);
	void SeekOn();
	void SeekOff();

	/******************************************************************************************************************\
	|											Flee Enemy Behavior													   |
	|	The Flee steering behavior returns a force that directs an agent away from a target position.  Flee returns	   |
	|	the steering force needed to change the current velocity to the desired velocity scaled to the maximum speed   |
	|	of the object																								   |
	\******************************************************************************************************************/
	point Flee(point& TargetPos);
	void FleeOn();
	void FleeOff();

	/******************************************************************************************************************\
	|											Arrive Enemy Behavior												   |
	|	The Arrive steering behavior returns a force that directs an agent toward a target position with decreasing	   |
	|	speed.  Arrive makes use of the enumerated Deceleration value contained within the class to control how		   |
	|	quickly the agent will approach its destination.  The end result is a steering force needed to change the	   |
	|	current velocity into the desired velocity scaled to the speed dictated by the deceleration.				   |
	\******************************************************************************************************************/
	point Arrive(point& TargetPos, Deceleration deceleration);
	void ArriveOn();
	void ArriveOff();

	/******************************************************************************************************************\
	|										Obstacle Avoidance Enemy Behavior										   |
	|	Obstacle Avoidance is a behavior that steers the agent to avoid obstacles lying in its path.  Obstacles being  |
	|	anything that have a bounding box or circle.  This works by creating a detection box that extends from the     |
	|	front of the agent proportional to its speed and keeping the detection box free of collisions.			   	   |
	\******************************************************************************************************************/
	point ObstacleAvoidance(/* Place List of Obstacles Here */);
	void ObstacleAvoidanceOn();
	void ObstacleAvoidanceOff();
	
	/******************************************************************************************************************\
	|										Wall Avoidance Enemy Behavior											   |
	|	Wall Avoidance is a behavior that steers the agent to avoid intersection with walls in the game world.  Walls  |
	|	being defined as line segments with a normal protruding in the direction they are facing.  The agent extends   |
	|	three detection "feelers" in forward directions and will turn the agent if any of these feelers intersect a	   |
	|	wall with a force of how far the feeler has passed beyond the wall in the direction of the wall normal.		   |
	\******************************************************************************************************************/
	point WallAvoidance(/* Place List of Walls Here */);
	void WallAvoidanceOn();
	void WallAvoidanceOff();

};	//End Steering Behaviors Class
